package com.syntax.javapoet;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import javapoet.syntax.com.annotation.SyntaxGen;
import javapoet.syntax.com.plib.Injector;


public class MainActivity extends AppCompatActivity {

    @SyntaxGen(R.id.id_text)
    public Button mText;

    @SyntaxGen(R.id.id_jack)
    public TextView mTextView;

    @SyntaxGen(R.id.id_image)
    public ImageView mImage;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Injector.inject(this);

        mText.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(MainActivity.this, "OK, Annotation", Toast.LENGTH_SHORT).show();
            }
        });
    }

}
